#ifndef CONNECTION_H
#define CONNECTION_H

#include "ntcpsocket.h"
#include "commondef.h"
//#include "datatransfer.h"


class Connection : public NTcpSocket
{
    Q_OBJECT
public:
    explicit Connection(QObject *parent = 0);
    ~Connection();

signals:
    void readyForUse(Connection *pConnection);
    void readData(sockTypes type, const QByteArray &message);
    void error(Connection *pConnection);
    void newConnection(Connection *pConnection);

private slots:
    void processReadyRead();
    void connectionError(QAbstractSocket::SocketError socketError);

public slots:
    void initConnection();
};

#endif // CONNECTION_H
